package com.rj.bd.sp.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.rj.bd.sp.entity.Sp;

/**
 * @desc   Sp模块的持久层
 */
//@Repository("spMapper")//这个单词在此的意思为数据库,该注解标识出当前的类/模块即是持久层(Dao),
                         //userMapper说明当前这个是user模块的Dao,即可以理解为userDao
public interface SpMapper extends BaseMapper<Sp> {
@Delete("delete from sp where id = #{id}")
public void delete(Sp sp);
@Select("select * from sp")
public List<Sp>  fiandAll();

@Select("select * from sp")
public Map<String, Object>  fiandAll1();
@Insert("insert into sp (id,mc,js,jg,jf,bj) values (#{id},#{mc},#{js},#{jg},#{jf},#{bj})")
public void save(Sp s);

@Select("select * from sp where id=#{id}")
public Sp queryById(String id);

@Update("update sp set mc=#{mc},js=#{js},jg=#{jg},jf=#{jf},bj=#{bj} where id=#{id}")
public void update(Sp sp);








	
}
